package com.apiz.service;


import com.apiz.common.BaseResponse;
import com.apiz.common.model.entity.UserInterfaceInfo;
import com.apiz.common.model.vo.InterfaceInfoVO;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 *
 */
public interface UserInterfaceInfoService extends IService<UserInterfaceInfo> {

    /**
     * 校验
     *
     * @param userInterfaceInfo
     * @param add
     */
    void validUserInterfaceInfo(UserInterfaceInfo userInterfaceInfo, boolean add);

    /**
     * 调用接口统计
     * @param userId
     * @param interfaceId
     * @return
     */
    boolean invokeCount(Long userId, Long interfaceId);


    Object payInterface(String interfaceName, String payAccount, int num, HttpServletRequest request);


    BaseResponse<List<InterfaceInfoVO>> listTopInvokeInterfaceInfo();


    void randomAllotInterfaceByUser(Long userId);

}
